/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package marsaMaroc.model;

import java.io.Serializable; 
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author salah
 */
@Entity
@Table(name = "ESCALE")
public class Escale implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID")
    private int id;
    @Column(name = "NAVIRE")
    private int num_navir; 
    @Column(name = "DATE_ACCOST_PREVUE")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date date_accostage_prevue;
    @Column(name = "DATE_ACCOST_REEL")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date date_accostage_reel;
    @Column(name = "TYPE_OPERATION")
    private String typeOperation;
    @Column(name = "ETAT")
    private boolean etat;
    @JoinColumn(name = "ID_PRODUIT") 
    @OneToOne(cascade = CascadeType.ALL)
    private Produit produit;
    @JoinColumn(name = "ID_ARRET")
    @OneToOne(cascade = CascadeType.ALL)
    private Arret arret;
    
    
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNum_navir() {
        return num_navir;
    }

    public void setNum_navir(int num_navir) {
        this.num_navir = num_navir;
    }

    
    public String getTypeOperation() {
        return typeOperation;
    }

    public void setTypeOperation(String typeOperation) {
        this.typeOperation = typeOperation;
    }

     

    public Produit getProduit() {
        return produit;
    }

    public void setProduit(Produit produit) {
        this.produit = produit;
    }

    public Arret getArret() {
        return arret;
    }

    public void setArret(Arret arret) {
        this.arret = arret;
    }

    public Date getDate_accostage_prevue() {
        return date_accostage_prevue;
    }

    public void setDate_accostage_prevue(Date date_accostage_prevue) {
        this.date_accostage_prevue = date_accostage_prevue;
    }

    public Date getDate_accostage_reel() {
        return date_accostage_reel;
    }

    public void setDate_accostage_reel(Date date_accostage_reel) {
        this.date_accostage_reel = date_accostage_reel;
    }

    

    public boolean getEtat() {
        return etat;
    }

    public void setEtat(boolean etat) {
        this.etat = etat;
    }
    
}
